package model.inventory;
// Generated Oct 27, 2012 8:43:23 AM by Hibernate Tools 3.2.1.GA


import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * MstHadiah generated by hbm2java
 */
@Entity
@Table(name="mst_hadiah" ,schema="inventory")
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class Hadiah  implements java.io.Serializable {

    private int id;
    private Unit mstUnit;
    private String plu;
    private String nama;
    private Date disabledDate;
    private Date updatedDate;
    private Date insertedDate;

    public Hadiah() {
    }
	
    public Hadiah(int id) {
        this.id = id;
    }
       
    @Id 
    @SequenceGenerator(name="hadiah_seq", sequenceName="inventory.mst_hadiah_id_seq", allocationSize=1)
    @GeneratedValue(strategy= GenerationType.SEQUENCE, generator="hadiah_seq")
    @Column(name="id", unique=true, nullable=false)
    public int getId() {
        return this.id;
    }
    
    public void setId(int id) {
        this.id = id;
    }
    @ManyToOne(fetch= FetchType.LAZY)
    @JoinColumn(name="unit_id")
    public Unit getMstUnit() {
        return this.mstUnit;
    }
    
    public void setMstUnit(Unit mstUnit) {
        this.mstUnit = mstUnit;
    }
    
    @Column(name="plu", length=20)
    public String getPlu() {
        return this.plu;
    }
    
    public void setPlu(String plu) {
        this.plu = plu;
    }
    
    @Column(name="nama", length=100)
    public String getNama() {
        return this.nama;
    }
    
    public void setNama(String nama) {
        this.nama = nama;
    }
    
    @Temporal(TemporalType.DATE)
    @Column(name="disabled_date", length=13)
    public Date getDisabledDate() {
        return this.disabledDate;
    }
    
    public void setDisabledDate(Date disabledDate) {
        this.disabledDate = disabledDate;
    }
    
    @Temporal(TemporalType.DATE)
    @Column(name="updated_date", length=13)
    public Date getUpdatedDate() {
        return this.updatedDate;
    }
    
    public void setUpdatedDate(Date updatedDate) {
        this.updatedDate = updatedDate;
    }
    
    @Temporal(TemporalType.DATE)
    @Column(name="inserted_date", length=13)
    public Date getInsertedDate() {
        return this.insertedDate;
    }
    
    public void setInsertedDate(Date insertedDate) {
        this.insertedDate = insertedDate;
    }

}


